package com.study.chunguard.common.constant;

/**
 * Redis 键常量
 *
 * @author zlt
 * @since 2018/7/27 13:50
 */
public class RedisKeyConstants {
    private RedisKeyConstants() {
        throw new IllegalStateException("Constant class");
    }

    /**
     * 用户权限
     */
    public static final String PERMISSION_USER = "permission:user:";

    /**
     * 用户角色
     */
    public static final String ROLE_USER = "role:user:";

    /**
     * 事件编码生成的分布式锁
     */
    public static final String EVENT_CODE_GENERATE_LOCK = "lock:event_code_generate";

    /**
     * 积分明细编码生成的分布式锁
     */
    public static final String POINTS_DETAIL_CODE_GENERATE_LOCK = "lock:points_detail_code_generate";

    /**
     * 今日最新事件编码
     */
    public static final String TODAY_LATEST_EVENT_CODE = "event_code:today_latest";

    /**
     * 事件更新的分布式锁
     */
    public static final String EVENT_UPDATE_OPERATE_LOCK = "lock:event_update_operate:{}";

    /**
     * 事件动作的分布式锁
     */
    public static final String EVENT_OPERATE_LOCK = "lock:event_operate:{}";

    /**
     * 积分活动变动的分布式锁
     */
    public static final String POINTS_ACTIVITY_CHANGED_LOCK = "lock:points_activity_changed:{}";

    /**
     * 积分账户变动的分布式锁
     */
    public static final String POINTS_ACCOUNT_CHANGED_LOCK = "lock:points_account_changed:{}";

    /**
     * 积分账户变动的分布式锁
     */
    public static final String POINTS_COUPON_CHANGED_LOCK = "lock:points_coupon_changed:{}";

    /**
     * 逾期事件定时任务的分布式锁
     */
    public static final String OVERDUE_EVENT_TIMER_LOCK = "lock:timer:overdue";

    /**
     * 公交数据同步任务的分布式锁
     */
    public static final String BUS_DATA_SYNCHRONIZE_JOB_LOCK = "lock:job:bus_data_synchronize";

    /**
     * 卡券数据同步任务的分布式锁
     */
    public static final String COUPON_DATA_SYNCHRONIZE_JOB_LOCK = "lock:job:coupon_data_synchronize";

    /**
     * 监控设备地理位置key
     */
    public static final String MONITOR_EQUIP_DEO_KEY = "geo:monitor";

    /**
     * 监控设备地理位置key
     */
    public static final String EQUIP_GEO_KEY = "geo:equip";

    /**
     * 案件罚款信息更新的分布式锁
     */
    public static final String LAW_CASE_FINE_INFO_KEY = "lock:law_case_fine_info_update_operate:{}";

    /**
     * 罚款信息定时任务锁
     */
    public static final String LAW_CASE_FINE_TIMER_KEY = "lock:timer:law_case_fine";

    /**
     * 积分活动统计任务的分布式锁
     */
    public static final String POINTS_ACTIVITY_STATISTICS_JOB_LOCK = "lock:job:points_activity_statistics";

    /**
     * 事件动作的分布式锁
     */
    public static final String USER_CLOCK_LOCK_KEY = "user:clock:{}";

    /**
     * 单点登录授权码
     */
    public static final String SSO_CODE_KEY = "sso:code:{}";

    /**
     * 省平台案件新增
     */
    public static final String BD_CASE_KEY = "lock:cds:bdcase:{}";

    /**
     * 省平台推送事件失败记录key
     */
    public static final String PROVINCIAL_PUSH_FAIL_EVENT_SET_KEY = "provincial:push:fail:event";

    /**
     * 省平台推送派发失败记录key
     */
    public static final String PROVINCIAL_PUSH_FAIL_DISPATCH_SET_KEY = "provincial:push:fail:dispatch";

    /**
     * 登录失败次数限制key
     */
    public static final String LOGIN_FAILURE_TIMES_LIMIT_KEY = "login:failure:limit:";

    /**
     * 已派发事件撤回key
     */
    public static final String DISPATCHED_REVOKE_KEY = "lock:dispatched:revoke:{}";
}
